﻿#pragma once
#include "D3DUtil.h"

class GeoMemetryManager
{
public:
    virtual  void BuildGeometry(ID3D12Device* device,ID3D12GraphicsCommandList* cmdList) = 0;
public:
    const std::unordered_map<std::string,std::shared_ptr<MeshGeometry>>& GetGeometries() const;
    const std::shared_ptr<MeshGeometry> GetGeometry(const std::string& name);

protected:
    float GetHillsHeight(float x, float z)const;
    DirectX::XMFLOAT3 GetHillsNormal(float x, float z)const;

protected:
    std::unordered_map<std::string,std::shared_ptr<MeshGeometry>> mGeometries;
};
